--[[ Copyright 2012, Chris Ho                               ]]--
--[[ MIT License (Please read the LICENSE file for details) ]]--

-- Logging mechanism goes here.
Log = {};

-- Logging Levels (irrelevant if /traceai is off)
LOG_DEBUG = 1;
LOG_INFO = 2;
LOG_ALERT = 3;
LOG_LEVEL = LOG_INFO;

--[[ Log an alert message ]]--
function Alert(_message)
  Log(LOG_ALERT, "! " .. _message);
end
--[[ Log a debug message ]]--
function Debug(_message)
  Log(LOG_DEBUG, "- " .. _message);
end
--[[ Log an informative message ]]--
function Info(_message)
  Log(LOG_INFO, "? " .. _message);
end
--[[ Log a message ]]--
-- Note that you specify a logging level.
function Log(_level, _message)
  if (_level >= LOG_LEVEL) then TraceAI(_message) end
end
